﻿using System;
using System.Collections.Generic;

namespace Solidi
{
    sealed class ObjectReferenceEqualityComparer : IEqualityComparer<object>
    {
        public static readonly IEqualityComparer<object> Default = new ObjectReferenceEqualityComparer();

        bool IEqualityComparer<object>.Equals(object x, object y)
        {
            return Object.ReferenceEquals(x, y);
        }

        public int GetHashCode(object obj)
        {
            return obj.GetHashCode();
        }
    }
}
